<?php

namespace Database\Seeders;

use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;
use App\Models\Province;

class ProvinceSeeder extends Seeder
{
    /**
     * Run the database seeds.
     */
    public function run(): void
    {
        $provinces = [
            ['name' => '北京市', 'code' => '110000', 'sort_order' => 1],
            ['name' => '天津市', 'code' => '120000', 'sort_order' => 2],
            ['name' => '河北省', 'code' => '130000', 'sort_order' => 3],
            ['name' => '山西省', 'code' => '140000', 'sort_order' => 4],
            ['name' => '内蒙古自治区', 'code' => '150000', 'sort_order' => 5],
            ['name' => '辽宁省', 'code' => '210000', 'sort_order' => 6],
            ['name' => '吉林省', 'code' => '220000', 'sort_order' => 7],
            ['name' => '黑龙江省', 'code' => '230000', 'sort_order' => 8],
            ['name' => '上海市', 'code' => '310000', 'sort_order' => 9],
            ['name' => '江苏省', 'code' => '320000', 'sort_order' => 10],
            ['name' => '浙江省', 'code' => '330000', 'sort_order' => 11],
            ['name' => '安徽省', 'code' => '340000', 'sort_order' => 12],
            ['name' => '福建省', 'code' => '350000', 'sort_order' => 13],
            ['name' => '江西省', 'code' => '360000', 'sort_order' => 14],
            ['name' => '山东省', 'code' => '370000', 'sort_order' => 15],
            ['name' => '河南省', 'code' => '410000', 'sort_order' => 16],
            ['name' => '湖北省', 'code' => '420000', 'sort_order' => 17],
            ['name' => '湖南省', 'code' => '430000', 'sort_order' => 18],
            ['name' => '广东省', 'code' => '440000', 'sort_order' => 19],
            ['name' => '广西壮族自治区', 'code' => '450000', 'sort_order' => 20],
            ['name' => '海南省', 'code' => '460000', 'sort_order' => 21],
            ['name' => '重庆市', 'code' => '500000', 'sort_order' => 22],
            ['name' => '四川省', 'code' => '510000', 'sort_order' => 23],
            ['name' => '贵州省', 'code' => '520000', 'sort_order' => 24],
            ['name' => '云南省', 'code' => '530000', 'sort_order' => 25],
            ['name' => '西藏自治区', 'code' => '540000', 'sort_order' => 26],
            ['name' => '陕西省', 'code' => '610000', 'sort_order' => 27],
            ['name' => '甘肃省', 'code' => '620000', 'sort_order' => 28],
            ['name' => '青海省', 'code' => '630000', 'sort_order' => 29],
            ['name' => '宁夏回族自治区', 'code' => '640000', 'sort_order' => 30],
            ['name' => '新疆维吾尔自治区', 'code' => '650000', 'sort_order' => 31],
        ];

        foreach ($provinces as $province) {
            Province::create($province);
        }
    }
}